Next and NextValue (fld) are equivalent functions. However, you can use Next only with Crystal syntax, and NextValue (fld) only with Basic syntax.
fld is any valid database field or formula field.
A field value of the same type as the argument.
Next(fld) returns the value of the specified field for the next record.
You can use Next to identify the first or last record in a range, to identify the starting point for a new group, or to test for duplicate values.
The following examples are applicable to Crystal syntax:
Tests the next value in the {file.QTY} field to see if it is a zero value. If it is not, it divides the value by two. If it is a zero value, it returns the value itself.
If Remainder(Next ({file.SERIALNUM}), 300) = 0 Then
Divides the next value in the {file.SERIALNUM} field by 300. If there is no remainder, it flags the current value as "End of block". If there is a remainder (Else) it prints no flag. (This formula divides serial numbers into blocks of 300.)
Note: Using this function in a formula forces the formula to be evaluated at print time. For more information on evaluation time considerations, see Evaluation Time functions.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |